package main

import (
	"github.com/gin-gonic/gin"
	"honghu_be/dal"
	"io"
	"os"
)

func Init() {
	initProxy()
	initLog()
	dal.InitDB()
}

func initLog() {
	f, _ := os.Create("gin.log")
	gin.DefaultWriter = io.MultiWriter(f)
}

func initProxy() {
	var err error
	if err = r.SetTrustedProxies(nil); err != nil {
		panic(err)
	}
}
